package com.wudizaba.microservicesdemosystem.module.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 设备数据表
 * </p>
 *
 * @author wudizaba
 * @since 2024-06-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("device_data")
@ApiModel(value="DeviceData对象", description="设备数据表")
public class DeviceData implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "设备的唯一标识符")
    private String deviceId;

    @ApiModelProperty(value = "设备的名称")
    private String deviceName;

    @ApiModelProperty(value = "设备类型，如传感器、控制器等")
    private String deviceType;

    @ApiModelProperty(value = "设备安装位置")
    private String location;

    @ApiModelProperty(value = "上次维护时间")
    private LocalDateTime lastMaintenance;

    @ApiModelProperty(value = "设备状态 0 启动、1 停止")
    private Integer status;

    @ApiModelProperty(value = "数据记录时间戳")
    private LocalDateTime dataTimestamp;

    @ApiModelProperty(value = "温度读数")
    private BigDecimal temperature;

    @ApiModelProperty(value = "湿度读数")
    private BigDecimal humidity;

    @ApiModelProperty(value = "压力读数")
    private BigDecimal pressure;

    @ApiModelProperty(value = "记录创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "记录更新时间")
    private LocalDateTime updateTime;


}
